package com.hlbbcsr.business.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.encoding.Md5PasswordEncoder;

import com.hlbbcsr.dao.AddressDAO;
import com.hlbbcsr.dao.ContractDAO;
import com.hlbbcsr.dao.CustomerDAO;

public abstract class BaseManager {

	@Autowired
	private CustomerDAO customerDAO;
	@Autowired
	private AddressDAO addressDAO;
	@Autowired
	private ContractDAO contractDAO;
	
	public CustomerDAO getCustomerDAO() {
		return customerDAO;
	}
	
	public String encodeString(String str) {
		Md5PasswordEncoder encode = new Md5PasswordEncoder();
		return encode.encodePassword(str, null);
	}

	public AddressDAO getAddressDAO() {
		return addressDAO;
	}
	
	public ContractDAO getcontractDAO(){
		return contractDAO;
	}
	
}
